<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>签到打卡</title>
    <style>
        [v-cloak] {
            display: none;
        }

        /* 样式保持不变，与之前相同 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Helvetica Neue', Arial, sans-serif;
        }

        body {
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }

        #app {
            width: 100%;
            max-width: 800px;
            background-color: white;
            border-radius: 20px;
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
            overflow: hidden;
        }

        .header {
            background: linear-gradient(120deg, #3494E6, #EC6EAD);
            color: white;
            padding: 25px;
            text-align: center;
        }

        .header h1 {
            font-size: 28px;
            margin-bottom: 10px;
            font-weight: 600;
        }

        .header p {
            opacity: 0.9;
        }

        .calendar-container {
            padding: 20px;
        }

        .calendar-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .month-nav {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .nav-btn {
            background: #f1f3f6;
            border: none;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 18px;
            display: flex;
            justify-content: center;
            align-items: center;
            transition: all 0.3s;
        }

        .nav-btn:hover {
            background: #e2e6eb;
        }

        .current-month {
            font-size: 22px;
            font-weight: 600;
            color: #2c3e50;
        }

        .weekdays {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            text-align: center;
            font-weight: 600;
            color: #7f8c8d;
            margin-bottom: 15px;
        }

        .days-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 8px;
        }

        .day {
            height: 50px;
            display: flex;
            justify-content: center;
            align-items: center;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.3s;
            position: relative;
            font-weight: 500;
        }

        .day.current {
            background-color: #3498db;
            color: white;
            font-weight: 600;
        }

        .day.signed {
            background-color: #2ecc71;
            color: white;
            font-weight: 600;
        }

        .day.signed::after {
            content: '✓';
            position: absolute;
            top: 5px;
            right: 5px;
            font-size: 12px;
        }

        .day.empty {
            cursor: default;
        }

        .stats {
            background-color: #f8f9fa;
            padding: 20px;
            border-radius: 15px;
            margin-top: 25px;
            text-align: center;
        }

        .stats h3 {
            color: #2c3e50;
            margin-bottom: 15px;
        }

        .stats-content {
            display: flex;
            justify-content: space-around;
        }

        .stat-item {
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .stat-value {
            font-size: 24px;
            font-weight: 700;
            color: #3498db;
        }

        .stat-label {
            font-size: 14px;
            color: #7f8c8d;
        }

        .actions {
            display: flex;
            justify-content: center;
            margin-top: 25px;
            padding: 0 20px 20px;
        }

        .sign-btn {
            background: linear-gradient(120deg, #3494E6, #EC6EAD);
            color: white;
            border: none;
            padding: 12px 25px;
            border-radius: 10px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 4px 10px rgba(52, 152, 230, 0.3);
        }

        .sign-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 15px rgba(52, 152, 230, 0.4);
        }

        .sign-btn:disabled {
            background: #cccccc;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }

        @media (max-width: 600px) {
            #app {
                border-radius: 0;
            }

            body {
                padding: 0;
                align-items: normal;
            }

            .header {
                /* border-radius: 0; */
                padding: 15px;
            }

            .header h1 {
                font-size: 22px;
            }

            .current-month {
                font-size: 18px;
            }

            .day {
                height: 40px;
                font-size: 14px;
            }
        }
    </style>
</head>

<body>
    <div id="app" v-cloak>
        <div class="header">
            <h1>每日签到</h1>
            <p>坚持签到，每日可获取{{formData.Points || 0}}积分</p>
        </div>

        <div class="calendar-container">
            <div class="calendar-header">
                <div class="month-nav">
                    <button class="nav-btn" @click="prevMonth">←</button>
                    <span class="current-month">{{ currentYear }}年{{ currentMonth + 1 }}月</span>
                    <button class="nav-btn" @click="nextMonth">→</button>
                </div>
            </div>

            <div class="weekdays">
                <div v-for="day in weekdays" :key="day">{{ day }}</div>
            </div>

            <div class="days-grid">
                <div v-for="(day, index) in days" :key="index" :class="['day', 
                            day === 0 ? 'empty' : '', 
                            isCurrentDay(day) ? 'current' : '', 
                            isSigned(day) ? 'signed' : '']">
                    {{ day === 0 ? '' : day }}
                </div>
            </div>

            <div class="stats">
                <h3>本月签到统计</h3>
                <div class="stats-content">
                    <div class="stat-item">
                        <span class="stat-value">{{ signedDays }}</span>
                        <span class="stat-label">已签到</span>
                    </div>
                    <div class="stat-item">
                        <span class="stat-value">{{ continuousDays }}</span>
                        <span class="stat-label">连续签到</span>
                    </div>
                    <div class="stat-item">
                        <span class="stat-value">{{ daysInMonth - signedDays }}</span>
                        <span class="stat-label">未签到</span>
                    </div>
                </div>
            </div>
        </div>
        <div class="actions">
            <button class="sign-btn" @click="signToday" :disabled="isTodaySigned">今日签到</button>
        </div>
    </div>
    <script src="../../config/config.js"></script>
    <script src="../../yl/vue.js"></script>
    <script src="../../utils/utils.js"></script>
    <script src="../../yl/jquery.min.js"></script>
    <script src="../../utils/jquery.cookie.js"></script>
    <script src="../../api/request.js"></script>
    <script src="../../utils/jweixin.js"></script>
    <script src="./js/index.js"></script>
</body>

</html>